#ifndef _BLUETOOTH_PS2_H_
#define _BLUETOOTH_PS2_H_

#define HteJOYSTICK_RX           8
#define HteJOYSTICK_RY           6
#define HteJOYSTICK_LX           4
#define HteJOYSTICK_LY           2


#define HteJOYSTICK_BUTTON_L     1
#define HteJOYSTICK_HOME         3
#define HteJOYSTICK_L            5
#define HteJOYSTICK_ZL           7
#define HteJOYSTICK_R            9
#define HteJOYSTICK_ZR           10

#define HteJOYSTICK_MODE         11
#define HteJOYSTICK_PLUS         12
#define HteJOYSTICK_X            13
#define HteJOYSTICK_A            14
#define HteJOYSTICK_B            15
#define HteJOYSTICK_Y            16

#define HteJOYSTICK_BUTTON_R     17
#define HteJOYSTICK_MINUS        18
#define HteJOYSTICK_RIGHT        19 
#define HteJOYSTICK_LEFT         20
#define HteJOYSTICK_DOWN         21
#define HteJOYSTICK_UP           22


extern uint8_t ps2_data_list[23];
void writeBuffer(int16_t index,uint8_t c);
void readSerial(HardwareSerial &SerialX);
bool readjoystick(HardwareSerial &SerialX);
bool PS2ButtonPressed(uint8_t button);
void ps2loop(HardwareSerial &SerialX);
#endif
